import axios from 'axios'
const http = axios.create({
    baseURL:'http://127.0.0.1/',
    timeout:16000
})
// 请求拦截器
http.interceptors.request.use((config)=>{
    config.headers.Authorization = window.sessionStorage.getItem("token")
    return config
},(error)=>{
    return Promise.reject(error)
})
// 响应拦截器
http.interceptors.response.use((response)=>{
    return response
},(error)=>{
    return Promise.reject(error)
})
export default http